package net.zoneland.knowledge.notice;

import java.util.Arrays;
import java.util.StringJoiner;

/**
 * @author zmq
 * @date 2022/12/9 10:32
 */
public class WorkNotice {
    /**
     * 源系统ID.
     * <p>接入业务系统的编号:Y</p>
     */
    private String sourceSystemId;

    /**
     * 业务实体ID.
     * <p>有业务系统自己维护的唯一性编号，如工单号:Y</p>
     */
    private String bizEntityId;

    /**
     * 源模块ID.
     * <p>接入业务系统的接入模块的编号:N</p>
     */
    private String moduleId;

    /**
     * 通知标题.
     * <p>邮件标题或短信正文:Y</p>
     */
    private String noticeTitle;

    /**
     * 通知内容.
     * <p>理论上没有限制，但不建议过大:Y</p>
     */
    private String noticeContent;

    /**
     * 通知模式.
     * <p>1邮件、2短信、3邮件+短信:Y</p>
     */
    private int noticeMode;

    /**
     * 发送人类型.
     * <p>1账号、2邮箱、3手机号:Y</p>
     */
    private int senderType;

    /**
     * 发送人.
     * <p>发送人:Y</p>
     */
    private String sender;

    /**
     * 接收人类型.
     * <p>1账号、2邮箱、3手机号:Y</p>
     */
    private int recipientType;

    /**
     * 接收人.
     * <p>允许多人。多人的类型必须保证一样:Y</p>
     */
    private String[] recipients;

    /**
     * 定时发送时间.
     * <p>自1970年来的毫秒数，0表示立刻:Y</p>
     */
    private long scheduleTime;

    /**
     * 获取 sourceSystemId.
     */
    public String getSourceSystemId() {
        return sourceSystemId;
    }

    /**
     * 设置 sourceSystemId.
     *
     * @param sourceSystemId 属性值
     */
    public void setSourceSystemId(final String sourceSystemId) {
        this.sourceSystemId = sourceSystemId;
    }

    /**
     * 获取 bizEntityId.
     */
    public String getBizEntityId() {
        return bizEntityId;
    }

    /**
     * 设置 bizEntityId.
     *
     * @param bizEntityId 属性值
     */
    public void setBizEntityId(final String bizEntityId) {
        this.bizEntityId = bizEntityId;
    }

    /**
     * 获取 moduleId.
     */
    public String getModuleId() {
        return moduleId;
    }

    /**
     * 设置 moduleId.
     *
     * @param moduleId 属性值
     */
    public void setModuleId(final String moduleId) {
        this.moduleId = moduleId;
    }

    /**
     * 获取 noticeTitle.
     */
    public String getNoticeTitle() {
        return noticeTitle;
    }

    /**
     * 设置 noticeTitle.
     *
     * @param noticeTitle 属性值
     */
    public void setNoticeTitle(final String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    /**
     * 获取 noticeContent.
     */
    public String getNoticeContent() {
        return noticeContent;
    }

    /**
     * 设置 noticeContent.
     *
     * @param noticeContent 属性值
     */
    public void setNoticeContent(final String noticeContent) {
        this.noticeContent = noticeContent;
    }

    /**
     * 获取 noticeMode.
     */
    public int getNoticeMode() {
        return noticeMode;
    }

    /**
     * 设置 noticeMode.
     *
     * @param noticeMode 属性值
     */
    public void setNoticeMode(final int noticeMode) {
        this.noticeMode = noticeMode;
    }

    /**
     * 获取 senderType.
     */
    public int getSenderType() {
        return senderType;
    }

    /**
     * 设置 senderType.
     *
     * @param senderType 属性值
     */
    public void setSenderType(final int senderType) {
        this.senderType = senderType;
    }

    /**
     * 获取 sender.
     */
    public String getSender() {
        return sender;
    }

    /**
     * 设置 sender.
     *
     * @param sender 属性值
     */
    public void setSender(final String sender) {
        this.sender = sender;
    }

    /**
     * 获取 recipientType.
     */
    public int getRecipientType() {
        return recipientType;
    }

    /**
     * 设置 recipientType.
     *
     * @param recipientType 属性值
     */
    public void setRecipientType(final int recipientType) {
        this.recipientType = recipientType;
    }

    /**
     * 获取 recipients.
     */
    public String[] getRecipients() {
        return recipients;
    }

    /**
     * 设置 recipients.
     *
     * @param recipients 属性值
     */
    public void setRecipients(final String[] recipients) {
        this.recipients = recipients;
    }

    /**
     * 获取 scheduleTime.
     */
    public long getScheduleTime() {
        return scheduleTime;
    }

    /**
     * 设置 scheduleTime.
     *
     * @param scheduleTime 属性值
     */
    public void setScheduleTime(final long scheduleTime) {
        this.scheduleTime = scheduleTime;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", WorkNotice.class.getSimpleName() + "[", "]")
                .add("sourceSystemId='" + sourceSystemId + "'")
                .add("bizEntityId='" + bizEntityId + "'")
                .add("moduleId='" + moduleId + "'")
                .add("noticeTitle='" + noticeTitle + "'")
                .add("noticeContent='" + noticeContent + "'")
                .add("noticeMode=" + noticeMode)
                .add("senderType=" + senderType)
                .add("sender='" + sender + "'")
                .add("recipientType=" + recipientType)
                .add("recipients=" + Arrays.toString(recipients))
                .add("scheduleTime=" + scheduleTime)
                .toString();
    }
}
